import React, { useContext, createContext } from "react";

const JourneyContext = createContext<any>({});

export const Journey = () => {
    return (<></>);
};

export const createJourneyProvider = (data: AppView.IJourney) => {
    const Provider = (props: any) => <Journey data={data} {...props}/>;
    return {
        Provider,
        useJourney: () => useContext(JourneyContext)
    };
};

export const useJourney = () => useContext(JourneyContext);
